package com.itheima.ioTest_2;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class testUnicod {
    public static void main(String[] args) throws UnsupportedEncodingException {
        //meothd();
        byte[] bytes1={-23, -69, -111, -23, -87, -84, -25, -88, -117, -27, -70, -113, -27, -111, -104, -27, -106, -100, -26, -84, -94, 74, 65, 86, 65};
            String s=new String(bytes1);
        System.out.println(s);
    }

    public static void meothd() throws UnsupportedEncodingException {
        String s="黑马程序员喜欢JAVA";
        byte[] bytes = s.getBytes();
        System.out.println(Arrays.toString(bytes));
        byte[] bytes1 = s.getBytes("UTF-8");
        System.out.println(Arrays.toString(bytes1));
    }
}
